<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/pub/headmeta.jsp"%>
</head>
<body>
	<div class="admin">
		<div class="person-logo">
			<img src="images/left/person.png" width="68" height="68" />
		</div>
		<div class="person-font">${role}</div>
		<div class="person-font-bgr"><c:if test="${user_info.name!=''}">${user_info.name}</c:if><c:if test="${user_info.name==''}">${user_info.code}</c:if></div>
	</div>
	<div class="tools">
		<div class="tools-bar">
			<ul id="sonMenu"></ul>
		</div>
	</div>
	<form id="tmpForm" method="post" style="display:none;" target="mainFrame"></form>
</body>
</html>
<script type="text/javascript">
var curId;
//创建子菜单
function createSonMenu(objs){
	var menu=document.getElementById('sonMenu');	
	var s="";
	for(var i=0;i<objs.length;i++){
		var o=objs[i];
		s+="<li><a id='a_"+o.menuId+"' href=\"javascript:clickMenu('"+o.menuId+"');\"><img class=\"tools-sanjiao\" src=\"images/left/sanjiao.png\" width=\"6\" height=\"12\" />"+o.name+"</a></li>";
	}	
	menu.innerHTML=s;
}
//点击菜单
function clickMenu(id){
	//样式调整
	if(curId){
		$('#a_'+curId).removeClass("actived");
	}
	$('#a_'+id).addClass("actived");
	curId=id;
	//点击
	var url="${ctx}/sys!toLink.action?id="+id;
	var form = $('#tmpForm');
	form.attr('action', url);	
	form.submit();
}

</script>
